<template>
  <div class="block">
    <el-table :data="comictable">
      <el-table-column label="id" prop="id" sortable width="70px"/>
      <el-table-column label="作品名称"  prop="name"/>
      <el-table-column label="作品封面"  prop="cover">
        <template #default="scope">
          <img :src="this.comictable.cover" >
        </template>
      </el-table-column>
      <el-table-column label="作品分类" prop="classify"/>
      <el-table-column label="评分" prop="score"></el-table-column>
      <el-table-column label="简介" prop="introduce"/>
      <el-table-column label="操作" fixed="right" width="150px">
        <template #default="scope">
          <el-button @click="openPic">查看</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-pagination :total="total" current-page="currentpage" layout="total, prev, pager, next, jumper" />
  </div>
  <el-dialog v-model="dialog">
    
  </el-dialog>
</template>
<script>
import request from '@/api/http';
export default {
  name: "",
  data() {
    return {
      //作品
      comictable:[
        {
          id:123
        }
      ],
      Search:"",
      //页面详情

      //翻页栏
      total:2,
      currentpage:1,
      PageSize:10,
      dialog:false
    }
  },
  methods:{
    // 刷新表格
    loadtable(){
      request.get("/",
      {
        params:{
          PageNumber:this.currentpage,
          PageSize:this.PageSize
        }
      }
      ).then(
        res=>{
          this.comictable=res.records;
          this.total=res.records;
          this.currentpage=res.current;
        }
      );
    },
    //获取页码
    currentPageChange(currentpagecc){
      this.currentpage=currentpagecc;
      this.loadtable();
    },
    /*作品审查相关*/ 
    //通过审查
    passcomic(id){

    },
    //审查未通过
    reject(id){

    },
    /*
    打开审核弹窗
    */
   openPic(){
      this.dialog=true
   }
  },
  watch:{

  },
  computed:{},

  mounted(){

  },
  setup(){

  },
  
}
</script>
<style scoped lang="less">
.block{ 
  width: 165vh;
  // background-color: aqua;
  align-items: center;
  display: block;
  position: relative;
  padding-left:15px;
}
</style>